package com.youedata.util;

import cn.stylefeng.roses.core.datascope.DataScope;
import cn.stylefeng.roses.core.util.SpringContextHolder;
import com.youedata.sys.core.util.UserHolder;
import lombok.extern.slf4j.Slf4j;

@Slf4j
public class DataScopeUtil {


    public static DataScopeKit getContext() {
        return SpringContextHolder.getBean(DataScopeKit.class);
    }

    public static DataScope init() {
        DataScope dataScope = new DataScope();
        dataScope.setScopeName("dept_id");
        dataScope.setDeptIds(UserHolder.getDeptIds());
        return dataScope;
    }


}
